<?php
/** Core configuration file.
* @filesource
* @package Rho
* @subpackage Rho-app */

/* Core Settings */

/* bool . If we are in development mode or not. Set to FALSE when going into production. */
Rho::setConf('dev_mode', TRUE);

/* string . The base url of the website, including the http:// and ending with a slash. */
Rho::setConf('base_url', Rho::conf('dev_mode')?  'http://localhost/rho/www/' : 'http://www.example.net/');

/* string. A secret string of random characters that is used as salt when generating hashes.
You MUST change this.*/
Rho::setConf('secret', 'change me');

/* bool . If we have Mod_rewrite enabled or not.*/
Rho::setConf('use_rewrite', TRUE);

/* string.  The email address of the site's webmaster.  Used for sending alerts, and as the default from address
when sending email. */
Rho::setConf('webmaster_email', 'webmaster@localhost');

/* bool.  Whether the controller should attempt to compress the output using gzip compression.
Default is TRUE.  Change to FALSE if you're already using zlib output compression.*/
Rho::setConf('attempt_compression', TRUE);

/* string . The suffix to add to URLs when using mod_rewrite.*/
Rho::setConf('url_suffix', '.html');

/* string . The extension for controller files including dot prefix. Normally fine as .php.
* You only need to change this if you have a non-standard php extension (e.g. .php5) AND use_rewrite is FALSE
* Remember to change in app/_dispatch.php - see _docs/install.html .*/
Rho::setConf('ext', '.php');


/* Logging Settings - use the constants definind in the Rho class. Can be combined with & .*/

/* int . How Errors are logged. Default is to the application log file. */
Rho::setConf('log.errors', Rho::LOG_FILE);

/* int . How Critical Errors are logged. Default is to the application log file and the server log.*/
Rho::setConf('log.critical_errors', Rho::LOG_FILE & Rho::LOG_SYSTEM);

/* int . How alerts are logged.
By default, when in dev_mod to the application log, in production the app log and an emal is sent. */
Rho::setConf('log.alerts', Rho::conf('dev_mode') ? Rho::LOG_FILE : Rho::LOG_FILE & Rho::LOG_EMAIL );
 
/* int . How non-essential info messages are logged.
By default, to the application log when in dev_mode otherwise ignored. */
Rho::setConf('log.info', Rho::conf('dev_mode') ? Rho::LOG_FILE : Rho::LOG_OFF);


/* Database Settings */

// Default database

/* string. The type of database. Can be one from mysql, mysqli, mysql_old */
Rho::setConf('db.default.type', 'mysql');

/* string. The hostname or IP address of the database server.*/
Rho::setConf('db.default.server', 'localhost');

/* string. The name of the database to use.*/
Rho::setConf('db.default.dbname', 'rho');

/* string. Database username used when connecting.*/
Rho::setConf('db.default.username', Rho::conf('dev_mode') ? 'root' : 'dbuser' );

/* string.  Database password used when connecting.*/
Rho::setConf('db.default.password', Rho::conf('dev_mode') ? '' : 'dbpassword' );

/* bool . Whether we use persistant connections to the database. Default is FASE.*/
Rho::setConf('db.default.use_perm', FALSE);

/* string. Database characterset encoding - must be UTF-8.  Note that mySQL uses the string utf8.*/ 
Rho::setConf('db.default.enc', 'utf8');
 
/* string. The string to prefix all table names with when using this database. Default is none.*/
Rho::setConf('db.default.prefix', '');

// You configure other databases here , e.g. Rho::setConf('db.archive.type', 'mysql'); 
// Rho::setConf('db.archive.server', 'archive.example.net'); and so on

/* Language Settings */




/* Server-side Cache Settings */
